<script>
for (var i = 1; i <= 1001; i++) {
    document.write("<img src='http://static.ak.fbcdn.net/images/gifts/" + i + ".png'>");
}
</script>
